﻿Imports System.Configuration.Provider

Public Class SitemapProviderCollection
	Inherits ProviderCollection

	Default Public Shadows ReadOnly Property Item(ByVal name As String) As Disgrafic.Modules.Sitemap.SitemapProvider
		Get
			Return CType(MyBase.Item(name), SitemapProvider)
		End Get
	End Property

	Public Overrides Sub Add(ByVal provider As ProviderBase)
		If provider Is Nothing Then
			Throw New ArgumentNullException("provider")
		End If
		If Not (TypeOf provider Is SitemapProvider) Then
			Throw New ArgumentException("Invalid provider type", "provider")
		End If
		MyBase.Add(provider)
	End Sub

End Class